Video encoding and decoding method

ABSTRACT

A method for decoding an image based on an intra prediction, comprising: obtaining a first prediction pixel of a first region in a current block by using a neighboring pixel adjacent to the current block; obtaining a second prediction pixel of a second region in the current block by using the first prediction pixel of the first region; and decoding the current block based on the first and the second prediction pixels.

CROSS REFERENCE PARAGRAPH

This application is a continuation of U.S. patent application Ser. No.17/237,494, filed on Apr. 22, 2021, which is a continuation of U.S.patent application Ser. No. 16/662,291, filed on Oct. 24, 2019, nowissued as U.S. Pat. No. 11,051,028 on Jun. 29, 2021, which is acontinuation of U.S. patent application Ser. No. 15/495,880, filed onApr. 24, 2017, now issued as U.S. Pat. No. 10,491,905 on Nov. 26, 2019,which is a continuation of U.S. patent application Ser. No. 14/411,088,filed on Mar. 27, 2015, now issued as U.S. Pat. No. 9,667,965 on May 30,2017, which is a U.S. National Stage Entry of PCT application No.PCT/KR2013/005613, filed on Jun. 25, 2013, which claims priority fromand the benefit of Korean Patent Application Nos. 10-2012-0068019, filedon Jun. 25, 2012, 10-2013-0060060 filed on May 28, 2013, and10-2013-0072111 filed on Jun. 24, 2013, in the Korean IntellectualProperty Office, the disclosures of which are incorporated herein byreference.

TECHNICAL FIELD

The present invention relates to video encoding and decoding, and moreparticularly, to an apparatus and method for encoding and decoding avideo that may enhance accuracy of intra-prediction.

BACKGROUND ART

Recently, with the advent of a smartphone and a smart TV, the use ofvideo data through a wired/wireless communication network tends to growexplosively. Since video data has an excellent information deliveryability but a very large capacity, compared to general text data, thevideo data has difficulties in being transmitted or replayed and storedon a network channel having a limited bandwidth. In addition, since vastvideo information is appropriately processed according to requirement ofan application, a system for processing a video also requires a highspecification.

The video encoding includes lossy coding and lossless coding. H.264/AVCsupports the lossless coding in addition to the lossy coding. Inparticular, for the lossless encoding, a more efficient lossless codingtechnique has been adopted in H.264/AVC Fidelity Range Extension (FRExt)standardization. The lossless encoding technique that has been adoptedin FRExt does not just perform transformation and quantization in orderto prevent loss of data. That is, lossless compression may be performedby performing entropy coding directly on residual signals found throughintra-prediction and inter-prediction, without transformation andquantization.

In addition, standardization for high efficient video coding (HEVC) hasrecently been completed as next-generation video compression standardtechnology that is known to have compression efficiency approximatelytwice as great as conventional H.264/AVC.

HEVC defines a coding unit (CU), a prediction unit (PU), and a transformunit (TU), which form a quadtree structure, and applies an additionalin-loop filter such as a sample adaptive offset (SAO) and a deblockingfilter. In addition, HEVC enhances a compression encoding efficiency byimproving the existing intra-prediction and inter-prediction.

In the intra-prediction, encoding is performed using, as a predictionvalue for a pixel currently intended to be encoded, a value of a pixelaround the current pixel directly or a value generated by performingprocesses such as a filtering on several pixels around the currentpixel. In addition, a difference between a value generated through theprediction and a value of the current pixel is transmitted and encodedalong with other additional information (information regarding anintra-prediction mode, for example, a DC mode, a horizontal directionmode, or a vertical direction mode).

Here, in order to determine a prediction value of a current block, theintra-prediction uses a boundary pixel of a neighbor block that has everbeen encoded and then reconstructed. However, the intra-predictionmethod has a limitation in that a prediction error increases as adistance between a reference pixel and a current pixel increases.

Furthermore, when the intra-prediction is not performed well despite anyintra-prediction mode depending on characteristics of a video, adifference that should be transmitted to a decoding apparatus isincreased, thus resulting in reduction of an encoding efficiency. Inparticular, for a complicated region in which a DC mode is applied,since the intra-prediction is performed using an average value of pixelsaround the current pixel, it is difficult to accurately predict thecurrent pixel. That is, since a difference between a value of thecurrent pixel and its prediction value increases, the encodingefficiency may be lowered.

Furthermore, for a planar mode according to the HEVC, when the currentpixel is positioned further inward, a distance between the current pixeland the reference pixel increases and accuracy of the prediction isreduced.

DISCLOSURE Technical Problem

The present invention is directed to providing an intra-predictionmethod that increases the accuracy of intra-prediction to enhanceencoding efficiency.

The present invention is also directed to providing a method of decodinga video encoded with an increased accuracy of the intra-prediction.

The present invention is also directed to providing an apparatus fordecoding a video encoded with an increased accuracy of theintra-prediction.

Technical Solution

One aspect of the present invention provides a video decoding methodincluding: calculating a difference between a current pixel positionedin a first pixel line according to an intra-prediction direction and aprevious pixel prior to the current pixel corresponding to theintra-prediction direction, calculating a predication value based on adifference between a current prediction pixel corresponding to thecurrent pixel and a previous prediction pixel corresponding to theprevious pixel, the current prediction pixel and the previous predictionpixel being positioned in a second pixel line prior to the first pixelline corresponding to the intra-prediction direction, and receiving abit stream generated by performing entropy encoding on a correcteddifference that is calculated by correcting the difference withreference to the prediction value; and decoding the received bit streamand generating a reconstructed image based on the reconstructeddifference and intra-prediction information.

Another aspect of the present invention provides a video decoding methodincluding: decoding a received bit stream to generate reconstructedinformation including a residual value for a current pixel andintra-prediction information; determining a final prediction value basedon a value obtained by adding the residual value for the current pixelto a prediction value of the current pixel according to theintra-prediction mode based on the intra-prediction information and atleast one prediction candidate value using a neighbor pixel adjacent tothe current pixel; and adding the residual value for the current pixelto the final prediction value to generate a reconstructed image.

Still another aspect of the present invention provides a video decodingmethod including: decoding received bit stream to generatereconstruction information including a residual value for a currentpixel and intra-prediction information; generating a first predictionvalue using a first reference pixel and a pixel T at an upper rightcorner of a current block including the current pixel based on theintra-prediction information; generating a second prediction value usinga second reference pixel and a pixel L at a lower left corner of thecurrent block including the current pixel based on the intra-predictioninformation; and generating a final prediction value for the currentpixel using the first prediction value and the second prediction value.

Advantageous Effects

With the video decoding method according to the present invention, it ispossible to decode a bit stream lossless-video-encoded with an increasedprediction efficiency of a pixel when intra-prediction is performed.

In addition, the intra-prediction method and apparatus using anadditional prediction candidate according to an embodiment of thepresent invention may enhance accuracy of the intra-prediction by usingan additional prediction candidate.

Furthermore, an apparatus and method for encoding and decoding a videousing the intra-prediction according to an embodiment of the presentinvention can enhance accuracy of the intra-prediction by performing theintra-prediction using a reference pixel having high correlation.

Moreover, the accuracy of the intra-prediction can be enhanced byapplying a weight that is based on a direction of the current block whena planar mode is applied.

DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual view illustrating an intra-prediction modeaccording to HEVC standard.

FIG. 2 is a conceptual view illustrating a current block and a pixeladjacent thereto.

FIG. 3 is a conceptual view illustrating a partially changing currentblock and a pixel adjacent thereto.

FIG. 4 is a conceptual view illustrating intra-prediction according toan embodiment of the present invention.

FIG. 5 is a conceptual view illustrating intra-prediction according toanother embodiment of the present invention.

FIG. 6 is a conceptual view illustrating intra-prediction according tostill another embodiment of the present invention.

FIG. 7 is a conceptual view illustrating an intra-prediction methodusing an additional prediction candidate according to an embodiment ofthe present invention.

FIGS. 8A to 8C are conceptual views illustrating a method of determininga final prediction value according to an embodiment of the presentinvention.

FIGS. 9A and 9B are exemplary views illustrating transmission ofinformation regarding a final prediction value according to anembodiment of the present invention.

FIGS. 10A and 10B are conceptual views illustrating a structure of a bitstream according to an embodiment of the present invention.

FIGS. 11A and 11B are conceptual views illustrating a method ofdetermining a final prediction value in a decoding method according toan embodiment of the present invention.

FIG. 12 is a conceptual view illustrating a planar mode according toHEVC standard.

FIG. 13 is a conceptual view illustrating intra-prediction according toan embodiment of the present invention.

FIG. 14A to 14C are conceptual views illustrating intra-predictionaccording to another embodiment of the present invention.

FIGS. 15A to 15C is conceptual views illustrating intra-predictionaccording to still another embodiment of the present invention.

FIG. 16 is a conceptual view illustrating intra-prediction according tostill another embodiment of the present invention.

FIG. 17 is a block diagram illustrating a video encoding apparatusaccording to an embodiment of the present invention.

FIG. 18 is a block diagram illustrating a video decoding apparatusaccording to an embodiment of the present invention.

MODES OF THE INVENTION

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. However,it should be understood that the present invention is not limited tothese embodiments, and may include any and all modification, variations,equivalents, substitutions and the like within the spirit and scopethereof. Like reference numerals refer to like elements throughout.

Relational terms such as first, second, and the like may be used fordescribing various elements, but the elements should not be limited bythe terms. These terms are only used to distinguish one element fromanother. For example, a first component may be called a secondcomponent, and a second component may also be called a first componentwithout departing from the scope of the present invention. The term‘and/or’ means any one or a combination of a plurality of related anddescribed items.

When it is mentioned that a certain component is “coupled with” or“connected with” another component, it should be understood that thecertain component is directly “coupled with” or “connected with” to theother component or another component may be located therebetween. Incontrast, when it is mentioned that a certain component is “directlycoupled with” or “directly connected with” another component, it will beunderstood that no component is located therebetween.

The terms used in the present specification are set forth to explain theembodiments of the present invention, and the scope of the presentinvention is not limited thereto. The singular number includes theplural number as long as they are not apparently different from eachother in meaning. In the present specification, it will be understoodthat the terms “have,” “comprise,” “include,” and the like are used tospecify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

Unless otherwise defined, all terms (including technical and scientificterms) used herein have the same meaning as commonly understood by oneof ordinary skill in the art to which this invention belongs. Terms suchas terms that are generally used and have been in dictionaries should beconstrued as having meanings matched with contextual meanings in theart. In this description, unless defined clearly, terms are not ideally,excessively construed as formal meanings.

A video encoding apparatus and a video decoding apparatus that will bedescribed below may be a user terminal such as a personal computer (PC),a laptop computer, a personal digital assistant (PDA), a portablemultimedia player (PMP), a PlayStation Portable (PSP), a wirelesscommunication terminal, a smart phone, and a TV or a server terminalsuch as an application server and a service server, and may denote avariety of apparatus including a communication device, such as acommunication modem, for communicating with wired/wireless communicationnetworks, a memory for storing various programs and data used to encodeor decode an video or perform inter or intra-prediction for encoding ordecoding, a microprocessor for executing the programs to performcalculation and control, and so on.

In addition, an image encoded into a bit stream by the video encodingapparatus is transmitted, in real time or in non-real time, to the videodecoding apparatus through a wired/wireless communication network suchas the Internet, a local wireless network (LAN), a wireless LAN, a WiBronetwork, a mobile communication network and through a variety ofcommunication interfaces such as a cable, a Universal Serial Bus (USB),or the like. The video decoding apparatus decodes the encoded image andreplays the reconstructed image.

Typically, a video may include a series of pictures, each of which maybe divided by a certain region such as a frame or block.

In addition, in the high efficiency video coding (HEVC) standard, theconcepts of a coding unit (CU), a prediction unit (PU), and a transformunit (TU) are defined. The CU is similar to macroblock. However, theencoding may be performed while the CU is variably adjusted. The PU isdetermined from a unit of encoding that is not divided any more, and maybe determined through a prediction type and a PU splitting process. TheTU is a TU for transformation and quantization, and may be greater thanthe PU in size, but cannot be greater than the CU in size. Accordingly,in the present invention, a block may be understood to have the samemeaning as a unit.

In addition, a block or pixel referenced to encode or decode a currentblock or a current pixel is referred to as a reference block orreference pixel. It will be understood by those skilled in the art thatthe term ‘picture’ used herein may be replaced with other terms havingthe same meaning as an image, a frame, and the like.

Preferred embodiments of the present invention will be described belowin more detail with reference to the accompanying drawings.

FIG. 1 is a conceptual view illustrating an intra-prediction modeaccording to HEVC standard.

Referring to FIG. 1 , the HEVC standard provides 35 intra-predictionmodes. As the number of prediction modes increases, the number ofoverhead bits for transmitting mode information increases. However,further accurate prediction may be performed to reduce a predictionerror using various prediction modes.

Mode 0 is a planar mode, mode 1 is a DC mode, and mode 2 to mode 34 areangular modes. The intra-prediction modes are simply described asfollows.

The planar mode is a method that is designed to efficiently encode avisually smooth image, and is efficient to predict a region in which apixel value gradually changes. The DC mode uses, as a prediction value,an average value of nearby pixels of a current prediction block.

In addition, the angular mode performs prediction based on a total of 33directions including a vertical direction and a horizontal direction.The vertical mode or horizontal mode copies a nearby pixel value in avertical or horizontal direction and uses the copied value as theprediction value. Angular prediction modes other than the horizontalmode and the vertical mode generate a prediction value through linearinterpolation because intra-prediction is performed in directions, inwhich 45 degrees is divided by 32 at the same angle with respect to anorigin 10, and thus pixels according to respective directions are not atan equal distance.

Intra-Prediction Referencing Pixel of Adjacent Line

FIG. 2 is a conceptual view illustrating a current block and a pixeladjacent thereto.

FIG. 2 shows a current block, which is a 4×4 block, and an adjacentpixel of a block neighboring to the current block. When anintra-prediction mode direction of the current block is horizontal, p0may be predicted from q0, p1 may be predicted from p0, and p2 may bepredicted from p1. For example, a prediction error, which is adifference between pixels, may be calculated not as p0-q0, p1-q0, p2-q0,p3-q0, but as p0-q0, p1-p0, p2-p1, and p3-p2. Here, the prediction errormay be indicated as r0=p0-q0, r1=p1-p0, and r2=p2-p1.

That is, for lossless video encoding and decoding, a prediction errortransmitted to a decoding apparatus may be indicated as r0=p0-q0,r1=p1-p0, r2=p2-p1, and image reconstruction may be performed asfollows: q0+r0 for p0, q0+r0+r1 for p1, q0+r0+r1+r2 for p2, andq0+r0+r1+r2+r3 for p3.

Accordingly, the prediction error may be calculated by a differencebetween a current pixel that is positioned in a pixel line in anintra-prediction direction and a previous pixel that is prior to thecurrent pixel corresponding to the intra-prediction direction. Here, thepixel line may be considered as a line of connecting pixels having thesame direction as a direction of an intra-prediction mode.

FIG. 3 is a conceptual view illustrating a partially changing currentblock and a pixel adjacent thereto.

Referring to FIG. 3 , an intra-prediction block to be intra-predictedgenerally has a direction in a horizontal direction, but includes anarea in which its direction varies partially. In this case, when aprediction error is calculated based on a difference between pixelspositioned in a horizontal pixel line, there is an area having a greatdifference and thus the number of bits increases, thereby reducingcoding efficiency.

For example, for a first pixel line and a second pixel line from the topin the prediction block, a large difference between a current pixelpositioned in a pixel line in an intra-prediction direction (horizontaldirection) and a previous pixel positioned previously to the currentpixel corresponding to the intra-prediction direction may occur, thusreducing the coding efficiency. That is, compared to the case of a thirdpixel line and a fourth pixel line from the top in the prediction block,the case of the first pixel line and the second pixel line from the topin the prediction block may generate a large difference between thecurrent pixel and the previous pixel.

FIG. 4 is a conceptual view illustrating intra-prediction according toan embodiment of the present invention.

The case in which the prediction direction according to theintra-prediction mode is a horizontal direction will be described withreference to FIG. 4 .

The difference between the current pixel positioned in the first pixelline according to the intra-prediction direction and the previous pixelprior to the current pixel corresponding to the intra-predictiondirection is calculated. A prediction value may be calculated based on aprevious difference between a current prediction pixel corresponding tothe current pixel and a previous prediction pixel corresponding to theprevious pixel, in which the current prediction pixel and the previousprediction pixel are positioned in a second pixel line prior to thefirst pixel line corresponding to the intra-prediction direction.Entropy-encoding may be performed on a corrected difference that iscalculated by correcting the difference with reference to the predictionvalue. That is, a process that may reduce the difference throughadditional prediction of the prediction error is performed. Thus, theencoding efficiency may be enhanced by decreasing the difference(prediction error) between the current pixel and the previous pixelwhile performing the lossless video encoding.

For example, when the intra-prediction direction is a horizontaldirection, a difference A between a current pixel and a previous pixelthat are positioned in a first pixel line from the top in theintra-prediction block may be corrected using, as a prediction value, adifference a between a current prediction pixel corresponding to thecurrent pixel and a previous prediction pixel corresponding to theprevious pixel, which are positioned a pixel line directly above theintra-prediction block. In addition, a corrected difference A-a may becalculated through correction in which the prediction value a issubtracted from the difference A.

That is, since pixels included in the first pixel line from the top ofthe intra-pixel block and pixels included in the pixel line directlyabove the intra-prediction block may change in a similar pattern to eachother, correction for reducing the difference A may be performed throughadditional prediction, thus enhancing coding efficiency.

In addition, the difference a between pixels positioned in a previousline (second pixel line) may be used as a prediction value withoutchange, and a value a* obtained by multiplying the difference a by aweight may be used as a prediction value a* of the difference A. Here,the weight may be determined based on continuity of pixels.

For example, in FIG. 4 , pixels included in the second pixel line fromthe top of the intra-prediction block and pixels included in the thirdpixel line from the top of the intra-prediction block do not change in asimilar pattern to each other. That is, in consideration of the thirdpixel line from the top of the intra-prediction block as a first pixelline and considering the second pixel line from the top of theintra-prediction block as a second pixel line, when a difference abetween pixels positioned in the second pixel line is used as aprediction value of the difference A between the current pixel and theprevious pixel that are positioned in the first pixel line, the numberof bits may rather increase. In this case, this may be adjusted using,as the prediction value, a value a* obtained by multiplying thedifference a between the pixels positioned in the second pixel line by aweight. In this case, the weight may be greater than 1, causing theprediction value a* to increase, and also may be less than 1, causingthe prediction value a* to decrease.

When the weight is determined as 1/255 for an image formed of 8-bitpixel (in this case, a pixel may have a maximum of 255), the value a*obtained by multiplying the difference a between the pixels positionedin the second pixel line by the weight may becomes close to zero.

FIG. 5 is a conceptual view illustrating intra-prediction according toanother embodiment of the present invention.

Referring to FIG. 5 , a first pixel line may be indicated as a solidline, and a second pixel line may be indicated as a dashed line. Thatis, first pixel lines may pass through an intra-prediction block to beintra-predicted and may be positioned a distance corresponding to atleast one pixel line apart from one another, and the second pixel linesmay be positioned a distance corresponding to at least one pixel lineapart from one another. For example, in the intra-prediction block, thefirst block lines may be odd-numbered lines from the top, and the secondblock lines may be even-numbered lines from the top.

First, a difference between a current pixel that is positioned in thefirst pixel line in an intra-prediction direction (horizontal direction)and a previous pixel that is prior to the current pixel corresponding tothe intra-prediction direction may be calculated and thenentropy-encoded. That is, a difference between pixels positioned in eachof the first pixel lines that are positioned a distance corresponding toat least one pixel line apart from one another may be entropy-encodedand then transmitted without correction by the prediction value.

Next, a difference between pixels positioned in the second pixel linemay be corrected using, as the prediction value, the difference betweenthe pixels positioned in the first pixel line.

Accordingly, the entropy-encoding may be performed on a difference thatis calculated for each distance corresponding to the at least one pixelline. A corrected difference may be calculated through correction forthe difference between the pixels positioned in the second pixel line,in which the correction is performed with reference to the predictionvalue that is based on the difference that is calculated for eachdistance corresponding to the at least one pixel line. The correcteddifference may be performed on the entropy-encoding.

For example, the odd-numbered pixel line may be not corrected using theprediction value, and the even-numbered line may be corrected withreference to the prediction value that is based on the differencecalculated in the odd-numbered line. A corrected difference that iscalculated through the correction may be utilized as a prediction error.

In addition, a difference between pixels that is calculated in a firstpixel line positioned above or below the second pixel line may beutilized as the prediction value. That is, assuming that a differencefor the first pixel line above the second pixel line is a and adifference for the first pixel line below the second pixel line is b,when a difference for the second pixel line that is the reference lineis A, the difference A for the second pixel line may be corrected usinga or b as the prediction value. In this case, in order to reduce thedifference A, a value that has a smaller difference with A between a andb may be utilized as the prediction value, and information regardingwhich value has been selected between a and b is additionallytransmitted to a decoding apparatus. Thus the decoding apparatus may beaware of which first pixel line the difference used as the predictionvalue is for.

For example, when the difference for the first pixel line positionedabove is 12, the difference for the first pixel line positioned below is25, and the difference for the second pixel line that is the referenceis 14, the difference for the first pixel line positioned above may beused as a prediction value of the difference for the second pixel linethat is the reference. In this case, information regarding that thedifference for the first pixel line positioned above has been selectedas the prediction value and the corrected difference of 2 may be encodedand then transmitted to the decoding apparatus.

Alternatively, when a value of |a−b| that is a difference between thedifference a for the first pixel line positioned above and thedifference b for the first pixel line positioned below is less than apreset threshold value TH, transmission of selection information mayrather reduce the coding efficiency. According, when |a−b|<TH, theprediction may be performed using preset information (selection of a orb).

Although the above-described embodiment of the present invention hasbeen described with reference to the case in which the intra-predictiondirection is a horizontal direction, the present invention may also beapplied to an intra-prediction mode having a different direction. Inaddition, the above-described weight or selection information may betransmitted through a sequence, a picture, a slice, or the like and thenused, or conforms to agreement between the encoding apparatus and thedecoding apparatus.

FIG. 6 is a conceptual view illustrating intra-prediction according tostill another embodiment of the present invention.

FIG. 6 shows a case in which another intra-prediction direction(diagonal down-right direction) is used. In FIG. 6 , the first pixelline may be indicated as a solid line, and the second pixel line may beindicated as a dashed line. That is, first pixel lines may be positioneda distance corresponding to at least one pixel line apart from oneanother, and the second pixel lines may be positioned a distancecorresponding to at least one pixel line apart from one another. Forexample, in the intra-prediction block, the first block lines may beodd-numbered lines from the top, and the second block lines may beeven-numbered lines from the top.

First, a difference between a current pixel that is positioned in thefirst pixel line in an intra-prediction direction (horizontal direction)and a previous pixel that is prior to the current pixel corresponding tothe intra-prediction direction may be calculated and thenentropy-encoded. That is, a difference between pixels positioned in eachof the first pixel lines that are positioned a distance corresponding toat least one pixel line apart from one another may be entropy-encodedand then transmitted without correction by the prediction value.

Next, a difference between pixels positioned in the second pixel linemay be corrected using, as the prediction value, the difference betweenthe pixels positioned in the first pixel line.

Accordingly, the above-described embodiment of the present invention maybe applied to the case in which the intra-prediction direction is thediagonal down-right direction and also an intra-prediction mode having adifferent direction. Furthermore, the above-described embodiment of thepresent invention may also be applied to a planar prediction, an angularprediction, and an arbitrary direction intra-prediction (ADI), which areintra-prediction methods conforming to the HEVC that is currently beingstandardized.

FIG. 17 is a block diagram illustrating a video encoding apparatusaccording to an embodiment of the present invention.

Referring to FIG. 17 , the encoding apparatus according to an embodimentof the present invention includes a subtractor 110, an entropy encodingunit 120, an adder 130, an inter-prediction unit 140, and anintra-prediction unit 150.

For a lossy encoding apparatus, entropy-encoding is performed aftertransformation and quantization. However, for a lossless encodingapparatus, the entropy-encoding is performed directly. When an inputimage is entered, a residual block (difference) obtained byinter-predicting or intra-predicting the input image may be transmittedto the entropy encoding unit. Except for this, the lossless encodingapparatus is similar to the lossy encoding apparatus, and thus adetailed description thereof will not be provided.

The encoding apparatus 100 according to an embodiment of the presentinvention may calculate a difference between a current pixel that ispositioned in a first pixel line in an intra-prediction direction and aprevious pixel that is prior to the current pixel corresponding to theintra-prediction direction.

The encoding apparatus 100 may calculate a prediction value based on aprevious difference between a current prediction pixel corresponding tothe current pixel and a previous prediction pixel corresponding to theprevious pixel, in which the current prediction pixel and the previousprediction pixel are positioned in a second pixel line prior to thefirst pixel line corresponding to the intra-prediction direction.

The encoding apparatus 100 may perform entropy-encoding on a correcteddifference that is calculated by correcting the difference withreference to the prediction value. The encoded bit stream may include aprediction error, which is information regarding the difference, andintra-prediction information. Here, the intra-prediction information mayinclude a block size, an intra-prediction mode, information regardingthe prediction value (selection information), and so on.

Accordingly, the encoding apparatus 100 according to an embodiment ofthe present invention may enhance the encoding efficiency by decreasingthe difference (prediction error) between the current pixel and theprevious pixel while performing the lossless video encoding. FIG. 18 isa block diagram illustrating a video decoding apparatus according to anembodiment of the present invention.

Referring to FIG. 18 , the decoding apparatus 200 according to anembodiment of the present invention includes an entropy decoding unit210, an adder 220, an intra-prediction unit 230, and an inter-predictionunit 240. For a lossy decoding apparatus, inverse quantization andinverse transformation are performed after entropy-decoding. However,for a lossless decoding apparatus, the inverse quantization and inversetransformation are not performed. Except for this, the lossless decodingapparatus is similar to the lossy decoding apparatus, and thus adetailed description thereof will not be provided.

The entropy decoding unit 210 may receive and decode a bit streamgenerated by the above-described lossless video encoding method orlossless video encoding apparatus to generate a reconstructed differenceand intra-prediction information.

The intra-prediction unit 230 may generate a prediction pixel throughthe intra-prediction based on the intra-prediction information.

The adder 220 may add the reconstructed difference to the predictionpixel to generate a reconstructed image.

With the above-described video encoding and decoding techniquesaccording to the present invention, it is possible to increase theencoding efficiency by increasing prediction efficiency of a pixelintended to be currently predicted with reference to variations ofsurrounding pixels in the intra-prediction.

Intra-Prediction Using Additional Prediction Candidate

FIG. 7 is a conceptual view illustrating an intra-prediction methodusing an additional prediction candidate according to an embodiment ofthe present invention.

An intra-prediction method for a current block with a size of 4×4 willbe described with reference to FIG. 7 . However, the size of the currentblock is not limited to 4×4.

Conventionally, a prediction value of a current pixel C may be generatedaccording to an intra-prediction mode. For example, when theintra-prediction mode is a DC mode, an average value of surroundingpixels of the current block may be used as the prediction value of thecurrent pixel C. That is, an average value of pixels in a region filledwith diagonal lines in FIG. 2 may be used as the prediction value of thecurrent pixel C. In this case, however, accuracy in the prediction isdegraded and thus a residual value may increase.

According to an embodiment of the present invention, at least onecandidate prediction value based on neighbor pixels a, b, c, and dadjacent to the current pixel C may be additionally used. For example,the pixels neighboring the current pixel C may use, as candidateprediction values, pixel values of neighbor pixels a, b, c, and dpositioned in a left side, an upper left side, an upper side, and anupper right side.

Accordingly, a final prediction value may be determined between theprediction value for the current pixel C according to theintra-prediction mode and the at least one candidate prediction value,and a residual value may be generated using a difference between thefinal prediction value and the pixel value of the current pixel C.However, the present invention is not limited to the positions andnumber of neighbor pixels.

A case in which the intra-prediction mode is a DC mode will be describedas an example.

When the intra-prediction mode is the DC mode, an average value ofsurrounding pixels of the current block may be used as the predictionvalue of the current pixel C. However, when the difference between thepixel value of the current pixel C and the prediction value of thecurrent pixel C according to the DC mode is great, the number of bits tobe transmitted to the decoding apparatus may increase.

This occurs because a correlation between the prediction value of thecurrent pixel C and the pixel value of the current pixel C is low, andthe encoding efficiency may be prevented from being reduced by applyingan additional candidate prediction value.

For example, the final prediction value may be determined between theprediction value of the current pixel C and at least one candidateprediction value that is based on a neighbor pixel adjacent to thecurrent pixel C. That is, the final prediction value may be determinedby comparing the difference between the prediction value of the currentpixel C and the pixel value of the current pixel C with the differencebetween the pixel value of the current pixel C and at least onecandidate prediction value and check a case in which the difference issmallest.

In addition, a residual value may be generated using the differencebetween the determined final prediction value and the pixel value of thecurrent pixel C.

Accordingly, it is possible to reduce the number of bits to betransmitted to the decoding apparatus by utilizing the final predictionvalue having the smallest residual value.

FIGS. 8A to 8C are conceptual views illustrating a method of determininga final prediction value according to an embodiment of the presentinvention.

Referring to FIGS. 8A to 8C, the final prediction value according to anembodiment of the present invention may be determined through variouscombinations of candidate prediction values. Here, the pixel value maybe represented as 0 to 255 for the 8-bit image, and a distance betweenpixels may represent a difference between the pixels.

First, referring to FIG. 8A, the final prediction value may bedetermined using, as candidate prediction values, prediction value ofthe current pixel C according to the DC mode and pixel values of theneighbor pixels a and b positioned in the left side and the left upperside of the current pixel C.

That is, the pixel value of the current pixel C may cause the smallestdifference with respect to the pixel value of the pixel b. Accordingly,the pixel value of the pixel b may be determined as the final predictionvalue.

Next, referring to FIG. 8B, the final prediction value may be determinedusing, as candidate prediction values, pixel values of the neighborpixels a, b, and c positioned in the left side, left upper side, andupper side of the current pixel C.

That is, the pixel value of the current pixel C may cause the smallestdifference with the pixel value of the pixel c. Accordingly, the pixelvalue of the pixel c may be determined as the final prediction value.

In addition, referring to FIG. 8C, the final prediction value may bedetermined using, as candidate prediction values, prediction value ofthe current pixel C according to the DC mode and an average value(a+b)/2 of pixel values of the neighbor pixels a and b positioned in theleft side and the left upper side of the current pixel C.

That is, the pixel value of the current pixel C may cause the smallestdifference with respect to the prediction value of the current pixel C.Accordingly, the prediction value of the current pixel C according tothe DC mode may be determined as the final prediction value.

Accordingly, according to an embodiment of the present invention, it ispossible to determine the final prediction value that causes thesmallest residual value through a various combination of candidateprediction values. Here, information regarding the combination,positions, and numbers of the candidate prediction values may betransmitted to the decoding apparatus through a sequence, a picture, aslice, a block, or the like, or may be preset between the encodingapparatus and the decoding apparatus.

FIGS. 9A and 9B are exemplary views illustrating transmission ofinformation regarding a final prediction value according to anembodiment of the present invention, and FIGS. 10A and 10B areconceptual views illustrating a structure of a bit stream according toan embodiment of the present invention.

Referring to FIGS. 9A and 9B, the final prediction value may bedetermined using, as candidate prediction values, pixel values of theneighbor pixels a, b, and c positioned in the left side, left upperside, and upper side of the current pixel C.

That is, the pixel value of the current pixel C may cause the smallestdifference with respect to the pixel value of the pixel b. Accordingly,the pixel value of the pixel b may be determined as the final predictionvalue.

In this case, addition, the difference between the pixel value of pixelb and the pixel value of the current pixel C may be determined as aresidual value. Furthermore, information regarding determination of thefinal prediction value may be additionally transmitted.

Meanwhile, a code word for identifying neighbor pixels adjacent to thecurrent pixel C may be previously assigned. For example, a code word of0 may be assigned to the left pixel a of the current pixel C, a codeword of 10 may be assigned to the left upper pixel b of the currentpixel C, and a code word of 11 may be assigned to the upper pixel c ofthe current pixel C. FIG. 4B shows an exemplary method of setting thecode word, and various methods may be utilized.

Accordingly, a code word of 10 may be added to a residual value andtransmitted to the decoding apparatus, in which the residual value isthe difference between the pixel value of pixel b and the pixel value ofthe current pixel C.

Here, information regarding the code word and the combination of thecandidate prediction values may be transmitted to the decoding apparatusthrough a sequence, picture, slice, block, or the like, or may be presetbetween the encoding apparatus and the decoding apparatus. That is, theencoding apparatus and the decoding apparatus may share informationregarding the positions and number of neighbor pixels that are utilizedas candidate prediction values.

Referring to FIGS. 10A and 10B, a bit stream transmitted to the decodingapparatus may include a residual value and a flag value. As shown inFIG. 10A, the residual value may be transmitted after the flag value isfirst transmitted. As shown in FIG. 10B, the flag value may betransmitted after the residual value is transmitted.

Here, the flag value may include information regarding the candidateprediction value, which may denote the positions and number of neighborpixels, which are bases of the candidate prediction values.

Furthermore, even when the flag value is not transmitted to the decodingapparatus, the final prediction value may be logically determinedaccording to a rule that is preset to the encoding apparatus and thedecoding apparatus.

FIGS. 11A and 11B are conceptual views illustrating a method ofdetermining a final prediction value in a decoding method according toan embodiment of the present invention.

Referring to FIGS. 7 and 11 , a decoding method according to anembodiment of the present invention may utilize pixel values of neighborpixels a, b, and c positioned in the left side, left upper side, and theupper side of the current pixel C. Here, for convenience of description,the pixel values of pixel a, pixel b, and pixel c are indicated as a, b,and c, respectively.

Referring to (1) of FIG. 11A, it can be seen that the pixel value of theneighbor pixel a positioned in the left side of the current pixel Camong neighbor pixels a, b, an c positioned in the left side, the leftupper side, and the upper side of the current pixel C is closest to thepixel value of the current pixel C. Accordingly, the pixel value ofpixel a may be the final prediction value, and a difference S betweenthe pixel value of the current pixel C and the pixel value of pixel amay be a residual value S for the current pixel C.

The encoding apparatus 100 according to an embodiment of the presentinvention may transmit the residual value S for the current pixel Cfirst, and then transmit a code word indicating pixel a. In this case,since the decoding apparatus 200 may logically determine the candidateprediction values according to the residual value S for the currentpixel C, a fewer or no flag values may be transmitted to the decodingapparatus 200.

Specifically, the decoding apparatus 200 according to an embodiment ofthe present invention may determine pixel a as the final predictionvalue even when the decoding apparatus 200 does not receive informationindicating that pixel a is the final prediction value from the encodingapparatus 100. That is, it is assumed that the decoding apparatus 200 isaware only of the residual value S for the current pixel C andinformation indicating that pixel a, pixel b, and pixel c are thecandidate prediction values. Here, a value obtained by adding theresidual value S for the current pixel C to the candidate predictionvalue may be represented as K.

As shown in (2) of FIG. 11A, when it is assumed that pixel a is thefinal prediction value, K is a+S, and K is closest to pixel a. In thiscase, pixel a is not excluded from the candidate prediction values.

As shown in (3) of FIG. 11A, when it is assumed that pixel b is thefinal prediction value, K is b+S, and K is closest to pixel a. In thiscase, pixel b may be excluded from the candidate prediction values.

As shown in (4) of FIG. 11A, when it is assumed that pixel c is thefinal prediction value, K is c+S, and K is closest to pixel a. In thiscase, pixel c may also be excluded from the candidate prediction values.

Accordingly, when the pixel value C of the current pixel, the pixelvalue a of pixel a, the pixel value b of the pixel b, and the pixelvalue c of pixel c are as shown in (1) of FIG. 11A, the decodingapparatus 200 may determine the final prediction value using only theresidual value S for the current pixel C. That is, the decodingapparatus 200 may determine the final prediction value using only pixela as the candidate prediction value.

Referring to (1) of FIG. 11B, it can be seen that the pixel value of theneighbor pixel c positioned in the upper side of the current pixel Camong neighbor pixels a, b, an c positioned in the left side, the leftupper side, and the upper side of the current pixel C is closest to thepixel value of the current pixel C. Accordingly, the pixel value ofpixel c may be the final prediction value, and a difference S betweenthe pixel value of the current pixel C and the pixel value of pixel cmay be the residual value S for the current pixel C.

The encoding apparatus 100 according to an embodiment of the presentinvention may transmit the residual value S for the current pixel Cfirst, and then transmit a code word indicating pixel c. In this case,since the decoding apparatus 200 may logically determine the candidateprediction values according to the residual value S for the currentpixel C, a fewer or no flag values may be transmitted to the decodingapparatus 200.

It is assumed that the decoding apparatus 200 is aware only of theresidual value S for the current pixel C and information indicating thatpixel a, pixel b, and pixel c are the candidate prediction values. Here,a value obtained by adding the residual value S for the current pixel Cto the candidate prediction value may be represented as K.

As shown in (2) of FIG. 11B, when it is assumed that pixel a is thefinal prediction value, K is a+S, and pixel a is closest to K. In thiscase, pixel a is not excluded from the candidate prediction values.

As shown in (3) of FIG. 11B, when it is assumed that pixel b is thefinal prediction value, K is b+S, and K is closest to pixel c. In thiscase, pixel b may be excluded from the candidate prediction values.

As shown in (4) of FIG. 11B, when it is assumed that pixel c is thefinal prediction value, K is c+S, and K is closest to pixel c. In thiscase, pixel c is not excluded from the candidate prediction values.

Specifically, since pixel a and pixel c other than pixel b among thethree candidate prediction values are logically true, the finalprediction value may be determined using a pixel value of any one of thetwo pixels.

Accordingly, only information regarding candidate prediction values tobe used to determine the final prediction value between pixel a andpixel c may be transmitted to the decoding apparatus 200.

That is, referring to FIG. 9B, although a code word of 11, which isinformation regarding pixel c based on three cases that are caused byutilizing three candidate prediction values, should be utilized, a codeword based on two cases may be utilized in a case as shown in (1) ofFIG. 11B. For example, pixel a may utilize a code word of 0, and pixel cmay utilize a cod word of 1.

Accordingly, it is possible to enhance encoding performance by reducingthe transmitted code word through verification of a logical error.

Referring again to FIG. 17 , a video encoding apparatus that performs anintra-prediction method according to an embodiment of the presentinvention includes a subtractor 110, an entropy encoding unit 120, anadder 130, an inter-prediction unit 140, and an intra-prediction unit150.

For a lossy encoding apparatus, entropy-encoding is performed aftertransformation and quantization. However, for a lossless encodingapparatus, the entropy-encoding is performed directly. When an inputimage is entered, a residual value obtained by inter-predicting orintra-predicting the input image may be transmitted to the entropyencoding unit. However, the encoding apparatus 100 according to anembodiment of the present invention is not limited to the losslessencoding apparatus.

The intra-prediction unit 150 according to an embodiment of the presentinvention may generate a prediction value of the current pixel Caccording to an intra-prediction mode and may generate at least onecandidate prediction value based on neighbor pixel adjacent to thecurrent pixel C.

In addition, the intra-prediction unit 150 may determine the finalprediction value between the prediction value of the current pixel C andat least one candidate prediction value.

In particular, when the intra-prediction mode is a DC mode, theintra-prediction unit 150 may generate at least one candidate predictionvalue based on neighbor pixels adjacent to the current pixel C. Here,the neighbor pixels may be positioned in the left side, the left upperside, the upper side, and the right upper side of the current pixel C.

The subtractor 110 may generate a residual value using the differencebetween the final prediction value and the pixel value of the currentpixel C.

Accordingly, the encoding apparatus 100 according to an embodiment ofthe present invention may determine the final prediction value bycomparing the prediction value of the current pixel C and the differencebetween the at least one candidate prediction value and the pixel valueof the current pixel C.

In addition, the encoding apparatus 100 may generate a bit stream byadding a flag value including information regarding at least onecandidate prediction value to a residual value.

Except for this, the lossless encoding apparatus is similar to the lossyencoding apparatus, and thus will be simply described. The entropyencoding unit 120 may perform entropy-encoding on a residual image, theadder 130 may add the residual image and the prediction image togenerate a reconstructed image, and the inter-prediction unit 140 mayperform intra-prediction through motion estimation.

Referring again to FIG. 18 , the decoding apparatus 200 according to anembodiment of the present invention includes an entropy decoding unit210, an adder 220, an intra-prediction unit 230, and an inter-predictionunit 240.

For a lossy decoding apparatus, inverse quantization and inversetransformation are performed after entropy-decoding. However, for alossless decoding apparatus, the inverse quantization and inversetransformation may not be performed. That is, the residual value for thecurrent pixel C is obtained by decoding the bit stream, and thereconstructed image may be generated by adding the final predictionvalue to the residual value for the current pixel C. However, thedecoding apparatus 200 according to an embodiment of the presentinvention is not limited to the lossless decoding apparatus.

The entropy-decoding unit 210 may decode the received bit stream togenerate reconstructed information including the intra-predictioninformation and the residual value for the current pixel C.

The intra-prediction unit 230 may determine the final prediction valueon the basis of values obtained by adding the residual value for thecurrent pixel C to the prediction value of the current pixel C accordingto the intra-prediction mode based on the intra-prediction informationand the at least one candidate prediction value based on neighbor pixelsadjacent to the current pixel C.

That is, the intra-prediction unit 230 may determine the finalprediction value by comparing the pixel value of the current pixel Cwith values obtained by adding the residual value for the current pixelC to the prediction value of the current pixel C and the at least onecandidate prediction value. Here, the candidate prediction value may bebased on pixel values of the neighbor pixels a, b, c, and d positionedin a left side, a left upper side, an upper side, and a right upper sideof the current pixel C.

In addition, the intra-prediction information may include informationregarding the positions and number of neighbor pixels adjacent to thecurrent pixel C.

Except for this, the lossless decoding apparatus is similar to thelossless encoding apparatus, and thus a detailed description thereofwill not be provided.

The intra-prediction method and apparatus using an additional predictioncandidate according to the above-describe embodiment of the presentinvention may enhance accuracy of the intra-prediction by using anadditional prediction candidate.

In addition, it is possible to enhance the encoding efficiency byenhancing accuracy of the intra-prediction and thus reducing a residualcomponent.

Intra-Prediction with Improved Planar Mode

FIG. 12 is a conceptual view illustrating a planar mode according toHEVC standard.

According to the planar mode with reference to FIG. 12 , first, a firstprediction value may be obtained using a pixel TR positioned in a upperright corner of the current block and a pixel positioned in the samehorizontal line as the current pixel and adjacent to the current block.In addition, a second prediction value may be obtained using a pixel LBpositioned in a lower left corner of the current block and a pixelpositioned in the same vertical line as the current pixel and adjacentto the current block. In addition, an average value of the firstprediction value and the second prediction value may be determined as aprediction value of the current pixel.

In FIG. 12 , a pixel corresponding to a dark area may denote a pixeladjacent to the current block. That is, the current block may beindicated as a block with a size of 8×8 in a bright region. However, thesize of the current block is not limited to 8×8. Accordingly, thecurrent pixel may be included in the current block and denote a pixel tobe encoded/decoded.

In the planar mode, when the current pixel is far from the pixel TRpositioned in the upper right corner of the current block and the pixelpositioned in the same horizontal line as the current pixel and adjacentto the current block and far from the pixel LB positioned in the lowerleft corner of the current block and the pixel positioned in the samevertical line as the current pixel and adjacent to the current block,the prediction accuracy may be reduced.

FIG. 13 is a conceptual view illustrating intra-prediction according toan embodiment of the present invention.

The planar mode according to HEVC uses, as reference pixels, the pixelTR positioned in the upper right corner of the current block and thepixel LB positioned in the lower left corner of the current block, whichare shown in FIG. 12 .

On the contrary, referring to FIG. 13 , the planar mode modifiedaccording to an embodiment of the present invention may use, asreference pixels, pixels selected from among pixels positioned in thesame horizontal line as the pixel TR positioned in the upper rightcorner of the current block. In addition, a pixel generated by filteringthe pixels positioned in the same horizontal line as the pixel TRpositioned in the upper right corner of the current block may be used asreference pixels. For example, in FIG. 13 , one of pixels positioned inT1 to Tn may be determined as a reference pixel, or a pixel generated byfiltering T1 to Tn may be determined as a reference pixel.

Here, a pixel selected from among pixels positioned in the samehorizontal line as the pixel TR in the upper right corner of the currentpixel or a pixel generated by filtering pixels positioned in the samehorizontal line as the pixel TR of the right upper side of the currentpixel may be defined as a pixel T of a right upper side of the currentpixel. Furthermore, the pixel T in the upper right corner of the currentpixel may conceptually include the pixel TR in the upper right corner ofthe current pixel.

Meanwhile, the planar mode modified according to an embodiment of thepresent invention may use a pixel selected from among pixels positionedin the same vertical line as the pixel LB in the lower left corner ofthe current pixel. In addition, a pixel generated by filtering thepixels positioned in the same vertical line as the pixel TR in the lowerleft corner of the current block may be used as a reference pixel. Forexample, in FIG. 13 , one of pixels positioned in L1 to Ln may bedetermined as a reference pixel, or a pixel generated by filtering L1 toLn may be determined as a reference pixel.

Here, a pixel selected from among pixels positioned in the same verticalline as the pixel LB in the lower left corner of the current pixel or apixel generated by filtering pixels positioned in the same vertical lineas the pixel LB of the left lower side of the current pixel may bedefined as a pixel T of a upper right corner of the current pixel.Furthermore, the pixel L in the lower left corner of the current pixelmay conceptually include the pixel L in the lower left corner of thecurrent pixel.

Accordingly, embodiments will be described below using concepts of thepixel T in the upper right corner of the current pixel and the pixel Lin the lower left corner of the current pixel.

FIGS. 14A to 14C are conceptual views illustrating intra-predictionaccording to another embodiment of the present invention, and FIGS. 15Ato 15C are conceptual views illustrating intra-prediction according tostill another embodiment of the present invention. In FIGS. 14 and 15 ,the current block may be indicated as a block with a size of 8×8 in abright region. However, the size of the current block is not limited to8×8.

An intra-prediction according to a planar mode modified according to anembodiment of the present invention will be described with reference toFIGS. 14 and 15 . A first prediction value may be generated using thepixel T positioned in the upper right corner of the current block and afirst reference pixel positioned in the same horizontal line as thecurrent pixel and adjacent to the current block. In addition, a secondprediction value may be generated using the pixel L positioned in theleft lower side of the current block and a second reference pixelpositioned in the same vertical line as the current pixel and adjacentto the current block. For example, the first prediction value may begenerated by performing interpolation using the pixel T in the upperright corner and the first reference pixel, and the second predictionvalue may be generated by performing interpolation using the pixel L inthe lower left corner and the second reference pixel.

A final prediction value for the current pixel may be generated usingthe first prediction value and the second prediction value. For example,the final prediction value may be generated by averaging the firstprediction value and the second prediction value.

First, referring to FIG. 14A, the intra-prediction may be performed onthe current pixel positioned at the upper left corner of the currentblock. That is, the intra-prediction may be performed beginning with thecurrent pixel positioned at the upper left corner of the current block.

Here, the intra-prediction may be performed on the current block that isincluded in the current block and is a start point of theintra-prediction in the same method as the existing planar mode. Thatis, the first reference pixel and the second reference pixel may bepixels included in a block adjacent to the current block.

Referring to FIGS. 14B and 14C, the intra-prediction may be sequentiallyperformed in the horizontal direction. For example, after theintra-prediction of the current pixel included in a top row of thecurrent block is completed, the intra-prediction may be performed on anext row (downward). That is, the intra-prediction may be performed in araster scan order.

Next, referring to FIG. 15A, the intra-prediction may be performed onthe current pixel positioned the upper left corner of the current block.That is, the intra-prediction may be performed beginning with thecurrent pixel positioned at the upper left corner of the current block.

Here, the intra-prediction may be performed on the current block that isincluded in the current block and is a start point of theintra-prediction in the same method as the existing planar mode. Thatis, the first reference pixel and the second reference pixel may bepixels included in a block adjacent to the current block.

Referring to FIGS. 15B and 15C, the intra-prediction may be sequentiallyperformed in the vertical direction. For example, after intra-predictionof the current pixel included in a leftmost column of the current blockis completed, the intra-prediction may be performed on a next column(rightward).

Although the case in which the intra-prediction is performed beginningwith the current pixel positioned at the upper left corner of thecurrent block has been described with reference to embodiments of FIGS.14 and 15 , the intra-prediction may be performed beginning with thecurrent pixel that is positioned at another position. Furthermore,although an embodiment in which the intra-prediction may be sequentiallyperformed in the horizontal or vertical direction has been described,the inter-prediction may be sequentially performed in a diagonaldirection. Here, the diagonal direction may denote a diagonal up-rightdirection.

According to an embodiment of the present invention, it is possible toenhance accuracy of the intra-prediction by utilizing, as referencepixels, a pixel positioned in the same horizontal line as the currentpixel and adjacent to the current block and a pixel positioned in thesame vertical line as the current pixel and adjacent to the currentblock.

FIG. 16 is a conceptual view illustrating intra-prediction according tostill another embodiment of the present invention.

Referring to FIG. 16 , the current block may be partitioned into atleast two regions, and then the planar mode may be performed. That is,the inter-prediction may be performed on a first region 10 and then asecond region 20. Since a pixel positioned in the first region on whichthe intra-prediction has been performed may be used as a referencepixel, the accuracy of the intra-prediction may be further enhanced.

For example, the intra-prediction is performed on the bottom row and therightmost column of the current block first, and then theintra-prediction may be performed on the remaining region 20.

In this case, the intra-prediction may be performed beginning with thecurrent pixel positioned at another position, instead of the currentpixel positioned at the upper left corner of the current block. Forexample, the intra-prediction may be performed beginning with thecurrent pixel positioned at the lower right corner of the current block.

Accordingly, in an embodiment of the present invention, it is possibleto enhance the accuracy of the intra-prediction by partitioning thecurrent block as shown in FIG. 6 and sequentially performingintra-prediction. However, the present invention may partition thecurrent block into various regions and sequentially performintra-prediction. The present invention is limited to the partition asshown in FIG. 16 .

The intra-prediction according to the planar mode of FIG. 12 may berepresented by Equation (1) below:

predSamples[x][y]=((nTbS−1−x)×p[−1][y]+(x+1)×p[nTbS][−1]+(nTbS−1−y)×p[x][−1]+(y+1)×p[−1][nTbS]+nTbS)>>(Log2(nTbS)+1)  [Equation 1]

where x and y indicate coordinate values of a pixel, nTbS indicates asize of the block, p[x][y] indicates a pixel value of a pixel positionedat a coordinate (x, y), and predSamples[x][y] indicates a predictedpixel value.

According an embodiment of the present invention, a first predictionvalue may be generated by applying weights to the pixel TR at the upperright corner of the current block and the pixel positioned in the samehorizontal line as the current pixel and adjacent to the current block.In addition, a second prediction value may be generated by applyingweights to the pixel LB at the lower left corner of the current blockand the pixel positioned in the same vertical line as the current pixeland adjacent to the current block.

A final prediction value for the current pixel may be generated usingthe first prediction value and the second prediction value. For example,the final prediction value may be generated by averaging the firstprediction value and the second prediction value.

That is, according to an embodiment of the present invention, theweights may be applied to the pixel TR at the upper right corner of thecurrent block, the pixel positioned in the same horizontal line as thecurrent pixel and adjacent to the current block, the pixel LB at thelower left corner of the current block, and the pixel positioned in thesame vertical line as the current pixel and adjacent to the currentblock. Here, the weights applied to the respective pixels may be thesame as or different from one another.

In addition, each weight may be determined based on a direction of thecurrent block, and the direction of the current block may be dividedinto a horizontal direction and a vertical direction.

For example, in order to find an optimal mode for the inter-predictionof the current block, the direction of the current block may be checkedwhen the prediction is performed. In this case, when the prediction isperformed using the planar mode, a prediction value may be generated byassigning an appropriate weight according to a previously founddirection pattern of the current block.

However, the direction of the current block is not limited to thehorizontal direction and the vertical direction.

The planar mode modified by applying a weight to a reference pixelaccording to an embodiment of the present invention may be representedby Equation (2) below:

predSamples[x][y]=(ω_(A)×(nTbS−1−x)×p[−1][y]+ω_(B)×(x+1)×p[nTbS][−1]+ω_(C)×(nTbS−1−y)×p[x][−1]+ω_(D)×(y+1)×p[−1][nTbS]+nTbS)>>(Log2(nTbS)+1)  [Equation 2]

where ω_(A), ω_(B), ω_(C), and ω_(D) may indicate weights. Accordingly,ω_(A), ω_(B), ω_(C), and ω_(D) may be determined based on the directionof the current block. For example, when the current block has thehorizontal direction, ω_(A) and ω_(B) may be greater than ω_(C) andω_(D). In addition, when the current block has the horizontal direction,ω_(A) and ω_(B) may be less than ω_(C) and ω_(D).

Meanwhile, the weights can be set by the encoding apparatus and set invarious units. That is, the weights can be assigned in various manners,for example, differently for each block or identically for the samepicture. Information on the weights may be set under agreement betweenthe encoding apparatus and the decoding apparatus. In addition, theencoding apparatus may send the information on the weights to thedecoding apparatus in units of a sequence, picture, block, or the like.

Referring again to FIG. 17 , a video encoding apparatus that performs anintra-prediction method according to an embodiment of the presentinvention includes a subtractor 110, an entropy encoding unit 120, anadder 130, an inter-prediction unit 140, and an intra-prediction unit150.

For a lossy encoding apparatus, entropy-encoding is performed aftertransformation and quantization. However, for a lossless encodingapparatus, the entropy-encoding is performed directly. When an inputimage is entered, a residual value obtained by inter-predicting orintra-predicting the input image may be transmitted to the entropyencoding unit. However, the encoding apparatus 100 according to anembodiment of the present invention is not limited to the losslessencoding apparatus.

The intra-prediction unit 150 according to an embodiment of the presentinvention may generate the first prediction value using the pixel T atthe upper right corner of the current block and the first referencepixel. In addition, the intra-prediction unit 150 may generate thesecond prediction value using the pixel L at the lower left corner ofthe current block and the second reference pixel. Here, the firstreference pixel is a pixel positioned in the same horizontal line as thecurrent pixel and adjacent to the current block, and the secondreference pixel is a pixel positioned in the same vertical line as thecurrent pixel and adjacent to the current block.

Here, the pixel T at the upper right corner of the current block may beany one of the pixel TR at the upper right corner of the current pixel,a pixel selected from among pixels positioned in the same horizontalline as the pixel TR at the upper right corner of the current pixel, anda pixel generate by filtering the pixels positioned in the samehorizontal line as the pixel TR at the upper right corner of the currentpixel.

In addition, the pixel L at the lower left corner of the current blockmay be any one of the pixel LB at the lower left corner of the currentpixel, a pixel selected from among pixels positioned in the samevertical line as the pixel LB at the lower left corner of the currentpixel, and a pixel generate by filtering the pixels positioned in thesame vertical line as the pixel LB at the lower left corner of thecurrent pixel.

The intra-prediction unit 150 may partition the current block into tworegions and sequentially perform the intra-prediction on eachpartitioned region.

Furthermore, the intra-prediction unit 150 may generate the firstprediction value by applying weights to the pixel TR at the upper rightcorner of the current block and the pixel positioned in the samehorizontal line as the current pixel and adjacent to the current block.In addition, the intra-prediction unit 150 may generate a secondprediction value by applying weights to the pixel LB at the lower leftcorner of the current block and the pixel positioned in the samevertical line as the current pixel and adjacent to the current block.

Here, each weight may be determined based on a direction of the currentblock, and the direction of the current block may be divided into ahorizontal direction and a vertical direction.

As a result, the intra-prediction unit 150 may generate a finalprediction value for the current pixel using the first prediction valueand the second prediction value. For example, the final prediction valuemay be generated by averaging the first prediction value and the secondprediction value.

The subtractor 110 may generate a residual value using a differencebetween the final prediction value and the pixel value of the currentpixel.

In addition, the encoding apparatus 100 may send information on theweights to the decoding apparatus in units of a sequence, picture,block, or the like.

Except for this, the lossless encoding apparatus is similar to the lossyencoding apparatus, and thus will be simply described. The entropyencoding unit 120 may perform entropy-encoding on a residual image, theadder 130 may add the residual image and the prediction image togenerate a reconstructed image, and the inter-prediction unit 140 mayperform intra-prediction through motion estimation.

Referring again to FIG. 18 , the decoding apparatus according to anembodiment of the present invention includes an entropy decoding unit210, an adder 220, an intra-prediction unit 230, and an inter-predictionunit 240.

For a lossy decoding apparatus, inverse quantization and inversetransformation are performed after entropy-decoding. However, for alossless decoding apparatus, the inverse quantization and inversetransformation may not be performed. That is, the residual value for thecurrent pixel is obtained by decoding the bit stream, and thereconstructed image may be generated by adding the final predictionvalue to the residual value for the current pixel. However, the decodingapparatus according to an embodiment of the present invention is notlimited to the lossless decoding apparatus.

The entropy-decoding unit 210 may decode the received bit stream togenerate reconstructed information including the intra-predictioninformation and the residual value for the current pixel. Here, theintra-prediction information may include information regarding theplanar mode that is modified according to an embodiment of the presentinvention.

The intra-prediction unit 230 may generate a first prediction valueusing the pixel T at the upper right corner of the current blockincluding the current block and the first reference pixel based on theintra-prediction information. In addition, the intra-prediction unit 230may generate a second prediction value using the pixel L at the lowerleft corner of the current block including the current block and thesecond reference pixel based on the intra-prediction information.

Here, the pixel T at the upper right corner of the current block may beany one of the pixel TR at the upper right corner of the current pixel,a pixel selected from among pixels positioned in the same horizontalline as the pixel TR at the upper right corner of the current pixel, anda pixel generate by filtering the pixels positioned in the samehorizontal line as the pixel TR at the upper right corner of the currentpixel.

In addition, the pixel L at the lower left corner of the current blockmay be any one of the pixel LB at the lower left corner of the currentpixel, a pixel selected from among pixels positioned in the samevertical line as the pixel LB at the lower left corner of the currentpixel, and a pixel generate by filtering the pixels positioned in thesame vertical line as the pixel LB at the lower left corner of thecurrent pixel.

The intra-prediction unit 230 may partition the current block into tworegions and sequentially perform the intra-prediction on eachpartitioned region.

Here, the first reference pixel is a pixel positioned in the samehorizontal line as the current pixel and adjacent to the current block,and the second reference pixel is a pixel positioned in the samevertical line as the current pixel and adjacent to the current block.

Furthermore, the intra-prediction unit 230 may generate the firstprediction value by applying weights to the pixel TR at the upper rightcorner of the current block and the pixel positioned in the samehorizontal line as the current pixel and adjacent to the current block.In addition, the intra-prediction unit 230 may generate a secondprediction value by applying weights to the pixel LB at the lower leftcorner of the current block and the pixel positioned in the samevertical line as the current pixel and adjacent to the current block.

Here, each weight may be determined based on a direction of the currentblock, and the direction of the current block may be divided into ahorizontal direction and a vertical direction.

As a result, the intra-prediction unit 230 may generate a finalprediction value for the current pixel using the first prediction valueand the second prediction value. For example, the final prediction valuemay be generated by averaging the first prediction value and the secondprediction value.

In addition, the adder 220 may add the residual image and the predictionimage to generate a reconstructed image. That is, the adder 220 may addthe residual value for the current pixel to the final prediction valueto generate the reconstructed image.

The inter-prediction unit 240 may perform inter-prediction throughmotion prediction.

Except for this, the lossless decoding apparatus is similar to thelossless encoding apparatus, and thus a detailed description thereofwill not be provided.

An apparatus and method for encoding and decoding a video using theintra-prediction according to an embodiment of the present invention canenhance accuracy of the intra-prediction by performing theintra-prediction using a reference pixel having high correlation.

In addition, the accuracy of the intra-prediction may be enhanced byapplying a weight that is based on a direction of the current block whenthe planar mode is applied.

Accordingly, it is possible to enhance the encoding/decoding efficiencyby enhancing accuracy of the intra-prediction.

While the example embodiments of the present invention and theiradvantages have been described in detail, it should be understood thatvarious changes, substitutions, and alterations may be made hereinwithout departing from the scope of the invention.

What is claimed is:
 1. An image decoding method, which is performed byan image decoding apparatus, the method comprising: dividing a currentblock into two regions including a first region and a second region, acurrent pixel belonging to the first region; performing intra predictionon the first region of the current block; and performing intraprediction on the second region of the current block based on the firstregion in which the intra prediction on the first region is completed,wherein performing the intra prediction on the first region of thecurrent block comprises: obtaining a first neighboring pixel of thefirst region belonging to the same horizontal line as the current pixelbelonging to the first region; obtaining a second neighboring pixel ofthe first region belonging to the same vertical line as the currentpixel belonging to the first region; and generating a prediction valueof the current pixel by applying weights to the first neighboring pixeland the second neighboring pixel, and wherein the prediction value ofthe current pixel is generated by using a pixel T belonging to a blockadjacent to an upper right corner of the first region and a pixel Lbelonging to a block adjacent to a lower left corner of the firstregion.
 2. The method of claim 1, wherein the weights includes a firstweight applied to a first reference pixel and a second weight applied toa second reference pixel.
 3. The method of claim 2, wherein the weightsare determined based on at least one of a direction of the current blockor a position of the current pixel.
 4. The method of claim 3, wherein inresponse to the direction of the current block being a horizontaldirection, the first weight applied to the first reference pixel issmaller than the second weight applied to the second reference pixel. 5.An image encoding method, which is performed by an image encodingapparatus, the method comprising: dividing a current block into tworegions including a first region and a second region, a current pixelbelonging to the first region; performing intra prediction on the firstregion of the current block; and performing intra prediction on thesecond region of the current block based on the first region in whichthe intra prediction on the first region is completed, whereinperforming the intra prediction on the first region of the current blockcomprises: obtaining a first neighboring pixel of the first regionbelonging to the same horizontal line as the current pixel belonging tothe first region; obtaining a second neighboring pixel of the firstregion belonging to the same vertical line as the current pixelbelonging to the first region; and generating a prediction value of thecurrent pixel by applying weights to the first neighboring pixel and thesecond neighboring pixel, and wherein the prediction value of thecurrent pixel is generated by using a pixel T belonging to a blockadjacent to an upper right corner of the first region and a pixel Lbelonging to a block adjacent to a lower left corner of the firstregion.
 6. The method of claim 5, wherein the weights includes a firstweight applied to a first reference pixel and a second weight applied toa second reference pixel.
 7. The method of claim 6, wherein the weightsare determined based on at least one of a direction of the current blockor a position of the current pixel.
 8. The method of claim 7, wherein inresponse to the direction of the current block being a horizontaldirection, the first weight applied to the first reference pixel issmaller than the second weight applied to the second reference pixel. 9.A non-transitory computer-readable medium storing a bitstream generatedby an encoding method, the method comprising: dividing a current blockinto two regions including a first region and a second region, a currentpixel belonging to the first region; performing intra prediction on thefirst region of the current block; and performing intra prediction onthe second region of the current block based on the first region inwhich the intra prediction on the first region is completed, whereinperforming the intra prediction on the first region of the current blockcomprises: obtaining a first neighboring pixel of the first regionbelonging to the same horizontal line as the current pixel belonging tothe first region; obtaining a second neighboring pixel of the firstregion belonging to the same vertical line as the current pixelbelonging to the first region; and generating a prediction value of thecurrent pixel by applying weights to the first neighboring pixel and thesecond neighboring pixel, and wherein the prediction value of thecurrent pixel is generated by using a pixel T belonging to a blockadjacent to an upper right corner of the first region and a pixel Lbelonging to a block adjacent to a lower left corner of the firstregion.